/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.zjdt.epserver.db.dao;

import java.util.List;
import java.util.Map;

/**
 *
 * @author dusin
 */
public interface UserDao {
    boolean doCreate(Object[] bean);
    boolean doDeleteById(int id);
    boolean doUpdateById(Object[] bean);
    public boolean doUpdatePassword(int id,String password);    
    public boolean doUpdatePasswordByUsername(String username,String password);
    
    public boolean doUpdateMobile(int id,String phoneNumber);
    
    Map<String,Object> findById(int id);
    List<Map<String,Object>> findAll();
    //List<Map<String,Object>> findAll(int start,int size); 
    
    public Map<String,Object> login(String username,String password);
    //下面是操作功能模块相关方法
    
    //加载该用户的所有功能模块
    public List<Map<String,Object>> findAllModuleByUsername(String username);
    //删除该用户的所有功能模块
    public boolean doDeleteAllModuleByUsername(String username);
    //创建该用户的所有功能模块
    public boolean doCreateAllModuleByUsername(String username,String[] menuCodes);
    
}
